package it.univaq.di.helpdesk.business.common;

import it.univaq.di.helpdesk.business.errors.AccountLockedException;
import it.univaq.di.helpdesk.business.errors.BusinessException;
import it.univaq.di.helpdesk.business.model.Role;
import it.univaq.di.helpdesk.business.model.User;

import java.util.List;
import java.util.Map;

public interface UserService {
	
	User authenticate(String username, String password)
			throws AccountLockedException, BusinessException;
	
	public void addUser(User user) throws BusinessException;
	
	public void editUser(User user) throws BusinessException;
	
	public void lockUnlockUser(User user) throws BusinessException;
	
	public boolean isUsernamePresent(String userName, int userID) throws BusinessException;
	
	public void editProfile (User user) throws BusinessException;
	
	public void addProfile (User user) throws BusinessException;
	
	public User findUserByID(int ID) throws BusinessException;
	
	public List<Role> findAllRoles() throws BusinessException; 
	
	public List<User> findAllTechnics() throws BusinessException;
	
	public List<User> findAllUsers() throws BusinessException;
	
	public List<User> searchForUsers(Map<String, String> queryParam) throws BusinessException;
}
